package com.example.demo;

import com.example.demo.candycrush.CandyCrushProcessor;
import com.example.demo.candycrush.strategy.RemoveStrategy;
import com.example.demo.candycrush.strategy.ReplaceStrategy;
public class DemoApplication {
	public static void main(String[] args) {
		System.out.println("=== Candy Crush ===");

		// 消除模式示例
		System.out.println("\nRemove模式:");
		new CandyCrushProcessor(new RemoveStrategy())
				.process("aabcccbbad")
				.forEach(System.out::println);

		// 替换模式示例
		System.out.println("\nReplace模式:");
		new CandyCrushProcessor(new ReplaceStrategy())
				.process("abcccbad")
				.forEach(System.out::println);
	}

}
